Static compilation option

Add configure option to enable static compilation.  Add #ifdef in plugin header to get it ready for MPI compilation.