Knees in, elbows in, back straight. Ignore the wind. Pedal just like you would if there were no wind, keeping cadence and effort about the same. IOW gear down. You might drop the cadence a little, for instance if you normally ride at 90, cut back to 85. If it's gusty, try to hold your cadence through the gusts, keep cadence rather than effort steady. A lot of it is a head game.
When you turn downwind, do the same thing. Keep the effort up and your usual cadence. Ignore the speed except for braking distance. Your average will always be less on a windy day, though.