Correct runtime permissions of loaded libraries