Correctly transform session into library
@sandsmark reminded me of OBJECT libraries
this links using the following flags: LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
@hindenburg this is kinda-urgent as many patches of mine depends on session being a library