determine lib at load time