Added version comparision

A number of calls are slightly different between 2.2 and 2.4, so to keep
this library usable, a function bVer was added (as well as a struct to
store the current API version) to make it easy to make minor changes to
the calls.