Use Rails' deconstantize method if available.