Modified the script to compile a shared lib