update to build on Mac, plus serial input fix