Move dynamic link define. Correct signed/unsigned warnings