Added support for NO_SHARED in make install.

(cherry picked from commit 91eaea364bc6f639b99cfaa57f508b4ed03659d2)
Install dll to prefix/bin instead of prefix/bin

(cherry picked from commit 187237b622ace8132ddc1aa87dcf29a969a17fd6)
Build import library for mingw

Signed-off-by: Timothy Gu <timothygu99@gmail.com>