Added defines to cast objects.