Revert "Added "-ldl" to compiler flags"

This reverts commit dffb42799f2a9f81ad95bc7238ee1e4d1400b111.