Replace BUILD_{SHARED,STATIC} with CONFIG_ counterparts