Fixes for Erlang/OTP 17.0 compilation.