Update class-wp-json-posts.php

Fix for this: https://github.com/WP-API/WP-API/issues/500