Some changes to compile options

Release target links libraries in statically