Support handling certain casts in expressions

This fixes evaluating the DBL_MAX constant in certain glibc versions.