add fix for rails 4.1.6

Fix is pulled from https://github.com/composite-primary-keys/composite_primary_keys/pull/236
Merge pull request #1 from chancedowns/ar_4.1.x

add fix for rails 4.1.6