A Historical-Beacon-Aided Localization Algorithm for Mobile Sensor Networks