Add getHostGuard function

This function is used to get the guard of generated AST node for host code.