RE/MAX boosts earnings with acquisitions as housing market slows