Add support for graphite-api

Update module to be compatible with both graphite-web and graphite-api.