configure: Add sanitize_var_name convenience function