Fix esp libs for linux and macosx