Escape '[' and ']' when generating native symbol name