Pull Request for issue #2

See https://github.com/allegro/php-protobuf/issues/2