fix error for the "posix-local" target in build script

This fixes #1800 in a slightly different manner.