Fix deprecation warnings and Date issues on julia 0.4