THRIFT-3820 Erlang: Detect OTP >= 18 to use new time correction

erlang:now/0 is deprecated BIF.
See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information.

This closes #1000
diff --git a/lib/erl/rebar.config.script b/lib/erl/rebar.config.script
new file mode 100644
index 0000000..c733823
--- /dev/null
+++ b/lib/erl/rebar.config.script
@@ -0,0 +1,7 @@
+Def0 = case not erlang:is_builtin(erlang, monotonic_time, 0) of
+           true -> [];
+           false -> [{d, time_correction}]
+       end,
+Defs = Def0,
+lists:keystore(erl_opts, 1, CONFIG,
+               {erl_opts, proplists:get_value(erl_opts, CONFIG, []) ++ Defs}).