Fix calculation of number of months between two given dates