Compatibility fixes for express 3.x