Avoid warnings on Erlang/OTP 17.

The solution is taken from https://github.com/eproxus/meck.