Add --dynamic option to ./configure

Review 957 by @tryneus
Closes #1478