fix polymorphicName var scope

see https://github.com/strongloop/loopback-datasource-juggler/issues/271

Signed-off-by: Clark Wang <clark.wangs@gmail.com>
Merge pull request #272 from clarkorz/fix/polymorphicName-var-scope

fix polymorphicName var scope