Only add option for shared libraries once

The way the test was done previously, it was added for *every* option after `--enable-shared`, not only that one.

This is annoying, but not serious enough to warrant inclusion in release/2013.10 (unless there are other things that must be added as well)