fix build on ROTA; fix matlab build