Added -static and -static-libgcc to library linker options to reduce dependences. Fixed small math error.