scripts: improve meter performance

Signed-off-by: Andrew 'Necromant' Andrianov <andrew@ncrmnt.org>
buildsystem: more OS X fixes and cleanups

Signed-off-by: Andrew 'Necromant' Andrianov <andrew@ncrmnt.org>