link to libFLAC/ogg statically for osx
switch to struct for callbacks, and implement new API with context rather than globals