Added "-ldl" to compiler flags