fix safari require bug