Fix use of API deprecated by Netty 4.1.