Updated calling conventions for some system libraries that don't compile cleanly with newer versions.