Add typecasting to static field initializers