Update the code to support latest cowboy version (0.8.2)