Fix alignment issues in serialization on ARM

This corrects an earlier patch for this issue.