fix constant recognition for JSON.parse and similar patterns