fix some deprecation warnings in julia 0.4