fixed out-of-sources build

```shell
mkdir build
cd build
../configure CC=mpicc
make
```
will fail