Fixed bug in getInducedDipoles()

This is the fix for https://simtk.org/tracker/index.php?func=detail&aid=2031&group_id=161&atid=435.