If pretty permalinks are disabled, use query URL
Merge pull request #138 from WP-API/ugly-permalinks

Respond to requests without depending on pretty permalink settings.  Fixes #69.