[RSTAT-63] Set DEBUG flag for correct library linkage