express 4.x compatibility

This is done a bit quickly, but if you're OK with breaking backwards compatibility, I think this fixes #4