Make cgi 7.8 ready

Builds under the latest platform and 7.8-RC2.

A different approach than the one taken in the other PR.

There may be a more elegant solution, I just followed the
common pattern I've seen in a few other libraries.

The version bump may also be overly aggressive.