conditional linking dl library
fixed plugin loader for windows