fix uninitialized dyn variable in map_library

this can only happen for invalid library files, but they were not
detected reliably because the variable was uninitialized.