Fix warnings from deprecated syntax and functions for Julia 0.4

[nan and inf deprecated](https://github.com/JuliaLang/julia/pull/8776)
[iceil merged into ceil](https://github.com/JuliaLang/julia/pull/9133)