Fix permissions (ranlib needs a writable file) and strip libraries