Fix compatibility issues with julia v0.4