Properly handle dynamic library compilation

It turns out it's much easier than documented! All the previous changes
are now reverted.

Version: 1.alpha.14.04

Signed-off-by: GreatEmerald <pastas4@gmail.com>