fixed gcc linking problem on some systems