Age of Information Minimization in Energy Harvesting Sensors with Non-Ideal Batteries