Fixes for date JS issues in Safari