Various linux compile fixes