Add compatibilty with OTP 18 typespec changes
Merge pull request #2777 from elixir-lang/emj-otp-18

Add compatibilty with OTP 18 typespec changes