NaCl: Use open_resource API for shared objects