Fix date issue on Mac OS X