Fix PHP notice when calling `wp export` with --category parameter

When using `wp export` with --category parameter I was getting the PHP notice below:

PHP Notice:  Trying to get property of non-object in php/export/class-wp-export-wxr-formatter.php on line 117

This resulted in several empty `<wp:category>` tags in the generated file. To fix it I had to revert a change made in aa27fd943291dd750a662a80599f8e65e6684488 which I'm not sure if it was intentional or not.