make library more portable