Fix the types for scopes/indexes

See https://github.com/strongloop/loopback/issues/562
Merge pull request #142 from strongloop/feature/fix-lb-562

Fix the types for scopes/indexes