Fix position independence for libraries