Add #ifdef around datetime for NumPy 1.5