The compiler does not generate direct addressing modes to access global variables. However, the linker is able to transform the extended addressing in a direct page addressing when the address is in page0.
This transformation is called linker relaxation. It is enabled by the -mrelax option.
You should use the -mrelax option when compiling and linking.