Fix if BUILD_SHARED_LIBS is OFF

The option() disrupts toolchain files.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>