Allow casting reference types like pointers. See Issue #721.