Add support for global keyword

It should handle #28 correctly.