rsvg_handle_close() was not checking for all the handle's states in which it can be called. Fixes #385