Tornado 4.x compatibility

Should fix #12