fixed external libraries build system