Merge pull request #803 from bnordbo/aggregation-libm