Fix deprecation of nan() in julia v0.4