Fix build for wai < 3