Work around issue with saved registers in global constructors
Move z buffer and textures into globals.